package com.ben.multiple.message.base;

import lombok.Getter;
import lombok.Setter;
import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * @author BenJin Yin
 * @date 2020/7/23
 */
@Getter
@Setter
@ConfigurationProperties(prefix = "multiple.message")
public class MessageProperties {
    private Type type;
    private Tencent tencent;
    private Aliyun aliyun;

    public enum Type {
        /**
         * 短信类型
         */
        ALIYUN, TENCENT;
    }

    @Getter
    @Setter
    public static class Tencent {
        /**
         * 在控制台申请
         */
        private String secretId;
        private String secretKey;
        /**
         * 短信SdkAppid在[短信控制台]添加应用后生成的实际SdkAppid,示例如1400006666。
         */
        private String smsSdkAppid;
        /**
         * 短信签名内容，使用 UTF-8 编码，必须填写已审核通过的签名 签名信息可登录短信控制台查看。
         */
        private String sign;
        /**
         * 请求域名；不用配置
         */
        private String endpoint = "sms.tencentcloudapi.com";
    }

    @Getter
    @Setter
    public static class Aliyun {
        /**
         * accessKeyId
         */
        private String accessKeyId;
        /**
         * accessKeySecret
         */
        private String accessKeySecret;
        /**
         * regionId
         */
        private String regionId;
        private String signName;
        /**
         * domain
         */
        private String domain = "dysmsapi.aliyuncs.com";
    }

}
